﻿@using KXCXW.Web.CommonClass.Ext
@using KXCXW.Web.CommonClass
@using kxcxw.Data.Common
@model IEnumerable<kxcxw.Data.Entities.Activity>
<script src="@Url.Content("~/Scripts/jcarousellite_1.0.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.easing.1.1.js")" type="text/javascript"></script>
@if (Model.Count() > 0)
{
    <script type="text/javascript">

        $(function () {
            $(".con").jCarouselLite({
                btnNext: ".next",
                btnPrev: ".prev",
                easing: "bounceout",
                auto: 8000,
                speed: 1000,
                scroll: 2,
                visible: 5
            });
            $(".prev").hover(function () {
                $(this).addClass("hover");
            }, function () {
                $(this).removeClass("hover");
            });
            $(".next").hover(function () {
                $(this).addClass("hover");
            }, function () {
                $(this).removeClass("hover");
            });
        });

    </script>
}
<style type="text/css">
    /*活动样式--开始*/
    .sales_promotion
    {
        border: 1px solid #E4E4E4;
        overflow: hidden;
        position: relative;
        float: left;
        width: 767px;
        margin-top: 5px;
    }
    .sales_promotion_marquee span.prev
    {
        height: 16px;
        right: 16px;
        width: 15px;
    }
    .sales_promotion_marquee span.next
    {
        background-position: -15px -406px;
        height: 16px;
        right: 0;
        width: 16px;
    }
    .sales_promotion ul
    {
        height: 120px;
        margin: 0 23px;
        overflow: hidden;
        padding: 15px 0;
    }
    .sales_promotion ul li
    {
        float: left;
        margin: 0px 5px;
    }
    .sales_promotion ul li img
    {
        height: 90px;
        width: 135px;
    }
    .sales_promotion ul li a span
    {
        display: block;
        height: 30px;
        width: 120px;
        text-align: center;
        font-size: 12px;
        line-height:15px;
        font-weight: bold;
        font-family: '微软雅黑';
        margin-left:6px;
    }
    .sales_promotion ul li.big img
    {
        width: 485px;
    }
    .sales_promotion span.arrow
    {
        background: url("../Content/img/kxcxw_01.gif") no-repeat;
        cursor: pointer;
        display: block;
        height: 26px;
        position: absolute;
        text-indent: -999em;
        top: 55px;
        width: 13px;
    }
    .sales_promotion span.arrow.prev
    {
        background-position: -36px -260px;
        left: 6px;
    }
    .sales_promotion span.arrow.next
    {
        background-position: -62px -260px;
        right: 6px;
    }
    .sales_promotion span.arrow.prev.hover
    {
        background-position: -49px -260px;
    }
    .sales_promotion span.arrow.next.hover
    {
        background-position: -75px -260px;
    }
    
    .sales_promotion .con
    {
        margin: 0 auto;
        padding: 10px 0;
    }
    .sales_promotion .con ul
    {
        margin: 0;
        padding: 0;
    }
    /*活动样式--结束*/
</style>
<div class="sales_promotion">
    <span class="arrow prev">上一页</span>
    <div class="con">
        <ul style="margin-left: 0px;">
            @{
                string[] colors = new string[] { "#268889", "#08390C", "#F05867", "#2F99FF", "#194077", "#FF9900" };
                int i = 0;
                foreach (var item in Model)
                {
                <li><a title="@item.Title" target="_blank" href="@item.ShopUrl"><span style="color:@colors[i]">@item.Title</span>
                    <img src="@Url.Content("~/Content/upload/Activity/img_135_90/" + item.ImageName)"
                    alt="@item.Title"/>
                </a></li>
                    i++;
                    if (i == 6)
                    {
                        i = 0;
                    }
                }
            }
        </ul>
    </div>
    <span class="arrow next">下一页</span>
</div>
